Skip to content

Add test for load failures due to mismatching imports#542

Open
leonm1 wants to merge 1 commit into
proxy-wasm:mainfrom
leonm1:import_error
Open

Add test for load failures due to mismatching imports#542
leonm1 wants to merge 1 commit into
proxy-wasm:mainfrom
leonm1:import_error

Conversation

@leonm1
Copy link
Copy Markdown
Contributor

@leonm1 leonm1 commented May 20, 2026

In addition, unifies the error message prefix across engines. I have filed #541 to fix the missing import-specific error in WasmEdge.

Also unifies the error messages across engines.

Signed-off-by: Matt Leon <mattleon@google.com>
Copy link
Copy Markdown
Member

@PiotrSikora PiotrSikora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but ideally those 2 nits would be addressed. Thanks1

Comment thread test/test_data/BUILD
)

wasm_rust_binary(
name = "invalid_import_type.wasm",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: invalid -> wrong or incorrect (it's technically a valid type).

Comment thread test/runtime_test.cc
EXPECT_TRUE(host->isErrorLogged("Failed to load Wasm module"));
// TODO: WasmEdge logs the failing import to stderr, but not to the Proxy-Wasm integration logger.
if (engine_ != "wasmedge") {
EXPECT_TRUE(host->isErrorLogged("proxy_log"));
Copy link
Copy Markdown
Member

@PiotrSikora PiotrSikora May 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: it took me a second to realize that this refers to the function name and not logging facility, so perhaps the proxy_log isn't the best hostcall to use here from the readability point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants